#1/usr/bin/env python
import time
import smbus

#********************************************
# Custard Pi 7 8591 25th Oct 2013

#I2C addresses

add= 0x4F
bus=smbus.SMBus(1)

#DtoA channel select
ch0= 0x00
ch1= 0x01
ch2= 0x02
ch3= 0x03

def readanalog(add):
#   bus.write_byte_data(add,ch,0x00)
    analog=bus.read_byte(add)
    return analog
    
def writedtoa(add,value):
    bus.write_byte_data (add, 0x44, value)

#******************************************